package com.self.common.constant;

/**
 * @version v1.0
 * @ClassName: CommonConstants
 * @Description:
 * @Author: Mac
 * @Date: 2022/5/29 12:47
 */
public interface CommonConstants {
    /**
     * UTF-8 字符集
     */
   String UTF8 = "UTF-8";

    /**
     * http请求
     */
   String HTTP = "http://";

    /**
     * https请求
     */
   String HTTPS = "https://";

    /**
     * 成功标记
     */
   Integer SUCCESS = 200;

    /**
     * 失败标记
     */
   Integer FAIL = 500;


    /**
     * 验证码 redis key
     */
   String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 验证码有效期（分钟）
     */
   long CAPTCHA_EXPIRATION = 2;
    /**
     * 匿名用户
     */
   String ANONYMOUS = "anonymousUser";
    /**
     * 匿名用户ID
     */
   long ANONYMOUS_ID = -1;
    /**
     * 授权类型-密码
     */
   String GRANT_TYPE_PASSWORD = "password";

    /**
     * 管理员登录
     */
    String ADMIN_TYPE = "admin_type" ;

    /**
     * 用户/会员登录
     */
    String MEMBER_TYPE  = "member_type" ;

    /**
     * 管理员角色
     */
    String ROLE_ADMIN = "ROLE_ADMIN";

    /**
     * token前缀
     */
    String JWT_TOKEN_PROFIX = "JWT_TOKEN:";

    String TOKEN_PROFIX = "bearer ";

}
